package com.whmskj.xjlhsc.mobie.Scheduling.mapper;

import com.whmskj.xjlhsc.mobie.Scheduling.Dto.EmpDTO;
import com.whmskj.xjlhsc.mobie.Scheduling.entity.IndividualPerformance;
import com.whmskj.xjlhsc.mobie.Scheduling.entity.Variety;
import com.whmskj.xjlhsc.mobie.Scheduling.vo.EmployeePerformanVO;
import com.whmskj.xjlhsc.mobie.Scheduling.vo.EmployeePerformanceVo;
import com.whmskj.xjlhsc.mobie.Scheduling.vo.WorkByProcessVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeePerformanceMapper {

    List<EmployeePerformanceVo> getEmployeePerformanceControllerVO(@Param("month") String month, @Param("process") String process, @Param("name") String name, @Param("typeOfWork") String typeOfWork, @Param("empCode") Integer empCode);

    List<Variety> getIndividualPerformanceVO(EmpDTO empDTO);

    List<IndividualPerformance> getIndividualPerformanceList(EmpDTO empDTO);

    //nameOfJob取前三个字
    @Select("select DISTINCT(substring(nameOfJob,1,3))AS workName from managementOfXt03 where process1 = #{process} AND productionWage = '是'")
    List<WorkByProcessVO> getWorkByProcess(String process);

    List<EmployeePerformanVO> getRewardAndPunish(@Param("ids") List<Integer> ids, @Param("month") String month);

    @Select("select name from yg01EmployeeFiles where id= #{empId}")
    String getEmpName(Integer empId);
}
